翻訳と辞書
Words near each other
・ Gotaro Yoshimura
・ Gotarrendura
・ Gotartowice
・ Gotartów
・ Gotarzes
・ Gotarzes I
・ Gotarzes II of Parthia
・ Gotas de Agua Dulce
・ Gotas de Rap
・ Gotav
・ Gotawa
・ Gotay
・ Gota’s War
・ Gotch
・ Gotcha
Gotcha (programming)
・ Gotcha (song)
・ Gotcha (video game)
・ Gotcha Day
・ Gotcha Force
・ Gotcha journalism
・ Gotcha! (1985 film)
・ Gotcha! (Adventure Time)
・ Gotcha! (album)
・ Gotcha! (funk band)
・ Gotcha! (quartet)
・ Gotcha! The Sport!
・ Gotchen Glacier
・ GotChosen
・ Gotcoaia River


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Gotcha (programming) : ウィキペディア英語版
Gotcha (programming)
In programming, a gotcha is a valid construct in a system, program or programming language that works as documented but is counter-intuitive and almost invites mistakes because it is both easy to invoke and unexpected or unreasonable in its outcome.〔
The classic gotcha in C /C++ is the construct

if (a=b) code;

It is syntactically valid: it puts the value of b into a and then executes code if a is non-zero. Sometimes this is even intended. However most commonly it is a typo: the programmer probably meant

if (a==b) code;

which executes code if a and b are equal.〔(Gotcha definition at The Jargon File )〕 Modern compilers will generate a warning when encountering this construct. To avoid this gotcha, there is a recommendation〔("VOID EXP21-C. Place constants on the left of equality comparisons" )〕 to keep the constants in the left side of the comparison, e.g. 42 == x rather than x == 42. This way, using = instead of == will cause a compiler error.
==See also==

* Usability

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Gotcha (programming)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.